import request from '@/utils/request'

export function getConfig(key, code) {
  return request({
    url: '/dingtalk/' + key + '/' + code,
    method: 'get'
  })
}

export function getUserInfo(code, tenantCode) {
  return request({
    url: '/dingtalk/getUserInfo/' + code + '/' + tenantCode,
    method: 'get'
  })
}

export function ddLogin(tenantCode, phonenumber, jobId) {
  var obj = {
    tenantCode,
    phonenumber,
    jobId
  }
  return request({
    url: '/dingtalk/login',
    method: 'post',
    data: obj
  })
}
